//
//  SurDetailTVCell.m
//  WildDonkey
//
//  Created by 佟小波 on 15/3/31.
//  Copyright (c) 2015年 lanou. All rights reserved.
//

#import "SurDetailTVCell.h"
#import "QWView.h"
#define topgap 10
#define gap 5

@implementation SurDetailTVCell

- (void)dealloc
{
    [_addressLabel release];
    [_nameLabel release];
    [_type release];
    [_shortdescLabel release];
    [_imgView release];
    [super dealloc];
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self=[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        CGRect rect = [UIScreen mainScreen].bounds;
        
        CGFloat width = rect.size.width;
        //底层视图
        UIView *bgView = [[UIView alloc] initWithFrame:CGRectMake(10, 10, width - 20, 100)];
        bgView.backgroundColor = [UIColor clearColor];
        
        //白底毛玻璃效果层
        UIView *bgView1 = [[UIView alloc] initWithFrame:CGRectMake(0, 0, width - 20, 100)];
        [bgView1 setBackgroundColor:[UIColor whiteColor]];
        bgView1.alpha = 0.4;
        [bgView addSubview:bgView1];
        
        //图片
        _imgView = [[UIImageView alloc] initWithFrame:CGRectMake(7, 15, 60, 60)];
        _imgView.layer.cornerRadius = 7;
        _imgView.alpha = 1;
        _imgView.layer.masksToBounds = YES;
        [bgView addSubview:_imgView];
        
        //标题
        _nameLabel = [[UILabel alloc] initWithFrame:CGRectMake(80, 10, 180, 25)];
//        		_nameLabel.backgroundColor = [UIColor redColor];
        _nameLabel.numberOfLines = 1;
        _nameLabel.lineBreakMode = NSLineBreakByTruncatingTail;
        _nameLabel.font = [UIFont systemFontOfSize:16];
        _nameLabel.textColor = [UIColor blackColor];
        [bgView addSubview:_nameLabel];
        
        //简介
        _shortdescLabel = [[UILabel alloc] initWithFrame:CGRectMake(80, 40, 190, 50)];
//        		_shortdescLabel.backgroundColor = [UIColor redColor];
        _shortdescLabel.numberOfLines = 0;
        _shortdescLabel.lineBreakMode = NSLineBreakByTruncatingTail;
        _shortdescLabel.font = [UIFont systemFontOfSize:14];
        [bgView addSubview:_shortdescLabel];
        
        
        [self.contentView addSubview:bgView];
        [bgView release];

        
    }
    return self;
}



@end
